home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / isconn_1 / form7.frm < prev    next >
Text File  |  1999-08-31  |  8KB  |  268 lines

  1. VERSION 5.00
  2. Begin VB.Form Form7 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H80000005&
  5.    BorderStyle     =   4  'Fixed ToolWindow
  6.    Caption         =   "Text editor"
  7.    ClientHeight    =   3615
  8.    ClientLeft      =   45
  9.    ClientTop       =   285
  10.    ClientWidth     =   2385
  11.    LinkTopic       =   "Form7"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   3615
  15.    ScaleWidth      =   2385
  16.    ShowInTaskbar   =   0   'False
  17.    StartUpPosition =   3  'Windows Default
  18.    Begin VB.PictureBox Picture3 
  19.       Appearance      =   0  'Flat
  20.       BackColor       =   &H80000018&
  21.       ForeColor       =   &H80000008&
  22.       Height          =   3615
  23.       Left            =   0
  24.       ScaleHeight     =   3585
  25.       ScaleWidth      =   2355
  26.       TabIndex        =   0
  27.       Top             =   0
  28.       Width           =   2380
  29.       Begin VB.PictureBox Picture4 
  30.          BackColor       =   &H00000000&
  31.          Height          =   255
  32.          Left            =   60
  33.          ScaleHeight     =   195
  34.          ScaleWidth      =   555
  35.          TabIndex        =   12
  36.          Top             =   3240
  37.          Width           =   615
  38.       End
  39.       Begin VB.ComboBox Combo3 
  40.          BackColor       =   &H00FFFFFF&
  41.          Height          =   315
  42.          Left            =   1560
  43.          TabIndex        =   11
  44.          Top             =   2400
  45.          Width           =   735
  46.       End
  47.       Begin VB.OptionButton Option1 
  48.          Height          =   375
  49.          Index           =   0
  50.          Left            =   60
  51.          Picture         =   "Form7.frx":0000
  52.          Style           =   1  'Graphical
  53.          TabIndex        =   10
  54.          Top             =   2760
  55.          Width           =   375
  56.       End
  57.       Begin VB.ComboBox Combo2 
  58.          Appearance      =   0  'Flat
  59.          BackColor       =   &H00FFFFFF&
  60.          Height          =   315
  61.          Left            =   60
  62.          TabIndex        =   9
  63.          Text            =   "Arial"
  64.          Top             =   2400
  65.          Width           =   1455
  66.       End
  67.       Begin VB.TextBox Text1 
  68.          Height          =   1695
  69.          Left            =   60
  70.          MultiLine       =   -1  'True
  71.          ScrollBars      =   2  'Vertical
  72.          TabIndex        =   8
  73.          Top             =   600
  74.          Width           =   2235
  75.       End
  76.       Begin VB.PictureBox Picture5 
  77.          BackColor       =   &H00000000&
  78.          Height          =   255
  79.          Left            =   1680
  80.          ScaleHeight     =   195
  81.          ScaleWidth      =   555
  82.          TabIndex        =   7
  83.          Top             =   3240
  84.          Width           =   615
  85.       End
  86.       Begin VB.OptionButton Option1 
  87.          Height          =   375
  88.          Index           =   2
  89.          Left            =   420
  90.          Picture         =   "Form7.frx":03FA
  91.          Style           =   1  'Graphical
  92.          TabIndex        =   6
  93.          Top             =   2760
  94.          Width           =   375
  95.       End
  96.       Begin VB.OptionButton Option1 
  97.          Height          =   375
  98.          Index           =   1
  99.          Left            =   780
  100.          Picture         =   "Form7.frx":0644
  101.          Style           =   1  'Graphical
  102.          TabIndex        =   5
  103.          Top             =   2760
  104.          Width           =   375
  105.       End
  106.       Begin VB.CheckBox Check1 
  107.          Height          =   375
  108.          Left            =   1200
  109.          Picture         =   "Form7.frx":088E
  110.          Style           =   1  'Graphical
  111.          TabIndex        =   4
  112.          Top             =   2760
  113.          Width           =   375
  114.       End
  115.       Begin VB.CheckBox Check2 
  116.          Height          =   375
  117.          Left            =   1560
  118.          Picture         =   "Form7.frx":0A5C
  119.          Style           =   1  'Graphical
  120.          TabIndex        =   3
  121.          Top             =   2760
  122.          Width           =   375
  123.       End
  124.       Begin VB.CheckBox Check3 
  125.          Height          =   375
  126.          Left            =   1920
  127.          Picture         =   "Form7.frx":0CAE
  128.          Style           =   1  'Graphical
  129.          TabIndex        =   2
  130.          Top             =   2760
  131.          Width           =   375
  132.       End
  133.       Begin VB.CheckBox Check4 
  134.          Caption         =   "Opaque"
  135.          Height          =   255
  136.          Left            =   600
  137.          Style           =   1  'Graphical
  138.          TabIndex        =   1
  139.          Top             =   3240
  140.          Width           =   1095
  141.       End
  142.       Begin VB.Label Label4 
  143.          AutoSize        =   -1  'True
  144.          BackStyle       =   0  'Transparent
  145.          Caption         =   "Write your text here."
  146.          Height          =   195
  147.          Left            =   120
  148.          TabIndex        =   14
  149.          Top             =   360
  150.          Width           =   1425
  151.       End
  152.       Begin VB.Label Label3 
  153.          BackColor       =   &H00800000&
  154.          Caption         =   " Text editing"
  155.          BeginProperty Font 
  156.             Name            =   "MS Sans Serif"
  157.             Size            =   8.25
  158.             Charset         =   0
  159.             Weight          =   400
  160.             Underline       =   -1  'True
  161.             Italic          =   0   'False
  162.             Strikethrough   =   0   'False
  163.          EndProperty
  164.          ForeColor       =   &H00FFFFFF&
  165.          Height          =   255
  166.          Left            =   0
  167.          TabIndex        =   13
  168.          Top             =   0
  169.          Width           =   2415
  170.       End
  171.    End
  172. End
  173. Attribute VB_Name = "Form7"
  174. Attribute VB_GlobalNameSpace = False
  175. Attribute VB_Creatable = False
  176. Attribute VB_PredeclaredId = True
  177. Attribute VB_Exposed = False
  178.  
  179. Private Sub Check4_Click()
  180. On Error Resume Next
  181. Form1.Label1(Text1.Tag).BackStyle = Check4.Value
  182. End Sub
  183.  
  184. Private Sub Form_Load()
  185. On Error Resume Next
  186. Dim i As Integer
  187. For i = 0 To Screen.FontCount - 1
  188. Form7.Combo2.AddItem Screen.Fonts(i)
  189. Next i
  190. For i = 1 To 120
  191. Form7.Combo3.AddItem i
  192. Next i
  193. End Sub
  194.  
  195. Private Sub Picture5_Click()
  196. On Error GoTo er
  197. MDI.CommonDialog1.ShowColor
  198. Picture5.BackColor = MDI.CommonDialog1.Color
  199. Form1.Label1(Text1.Tag).BackColor = Picture5.BackColor
  200. Exit Sub
  201. er:
  202. If Err.Number <> 32755 Then
  203. MsgBox Err.Description
  204. End If
  205. End Sub
  206. Private Sub Picture4_Click()
  207. On Error GoTo er
  208. MDI.CommonDialog1.ShowColor
  209. Picture4.BackColor = MDI.CommonDialog1.Color
  210. Form1.Label1(Text1.Tag).ForeColor = Picture4.BackColor
  211. Exit Sub
  212. er:
  213. If Err.Number <> 32755 Then
  214. MsgBox Err.Description
  215. End If
  216. End Sub
  217.  
  218. Private Sub Combo2_Click()
  219. On Error Resume Next
  220. Form1.Label1(Text1.Tag).FontName = Combo2.Text
  221. changes = True
  222. End Sub
  223.  
  224. Private Sub Combo3_Click()
  225. On Error Resume Next
  226. Form1.Label1(Text1.Tag).FontSize = Combo3.Text
  227. changes = True
  228. End Sub
  229.  
  230. Private Sub Combo4_Click()
  231. On Error Resume Next
  232. Form1.Shape1(Picture7.Tag).BorderStyle = Combo4.ListIndex
  233. End Sub
  234. Private Sub Check1_Click()
  235. On Error Resume Next
  236. Form1.Label1(Text1.Tag).FontBold = (Check1.Value <> 0)
  237. End Sub
  238.  
  239. Private Sub Check2_Click()
  240. On Error Resume Next
  241. Form1.Label1(Text1.Tag).FontItalic = (Check2.Value <> 0)
  242. End Sub
  243.  
  244. Private Sub Check3_Click()
  245. On Error Resume Next
  246. Form1.Label1(Text1.Tag).FontUnderline = (Check3.Value <> 0)
  247. changes = True
  248. End Sub
  249. Private Sub Option1_Click(Index As Integer)
  250. On Error Resume Next
  251. For i = 0 To 2
  252. If Option1(i).Value = True Then
  253.  Form1.Label1(Text1.Tag).Alignment = i
  254. End If
  255. Next i
  256. End Sub
  257.  
  258. Private Sub Text1_Change()
  259. On Error Resume Next
  260. Form1.Label1(Text1.Tag).Caption = Text1.Text
  261. changes = True
  262. If Text1.ForeColor = vbWhite Then
  263. Text1.BackColor = vblack
  264. Else
  265. Text1.BackColor = vbWhite
  266. End If
  267. End Sub
  268.